/*
 ------------------------------------------------------------------------------
 Copyright (C) 2009-2011 Eternal Games.

 This file is part of the Eternal Tech source code.

 The Eternal Tech source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Eternal Tech source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Eternal Tech source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// plane.h - Frustum plane library
//


#if !defined(__PLANE_H__) || !INCLUDE_GUARDS
#define __PLANE_H__


#define ON_EPSILON						0.1f

#define NORMAL_EPSILON					0.00001f
#define DIST_EPSILON					0.01f

// Plane sides
#define	PLANESIDE_FRONT					1
#define	PLANESIDE_BACK					2
#define PLANESIDE_CROSS					3
#define	PLANESIDE_ON					3

int					BoxOnPlaneSide (const vec3_t mins, const vec3_t maxs, const struct cplane_t *plane);
int					SphereOnPlaneSide (const vec3_t center, float radius, const struct cplane_t *plane);
int					PointOnPlaneSide (const vec3_t point, float epsilon, const struct cplane_t *plane);


#else
FILE_WARNING
#endif   // __PLANE_H__